<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page import="com.limetalks.util.Helper"%>
<%@page import="com.limetalks.data.Stream"%>
<%@page import="com.limetalks.data.User"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<% Integer authorId = Integer.valueOf(request.getParameter("authId")); %>

<html>
<head>
	<title>streams</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="css/streams.css">
</head>
<body>
	<center>
		<jsp:include page="header.jsp"> 
			<jsp:param name="user" value="" />
		</jsp:include>
		
		
		<div style="font-family: tahoma,arial,verdana,sans-serif,Lucida Sans; font-size: 11px; width:800px; height:655px;">
	
		<% User user = Helper.findUserById(authorId); %>
		<div class="subheader">
			<!--  b>Streams by <a href="author.html" style="color:white; text-decoration:underline;">Vladimir Stalmakov</a></b--> 
			<font color="white"><b>Streams by <%= user.getName() %></b></font> 
		</div>
		
		<div style="padding-bottom:20px; overflow:auto; width:800px; height:600px;">
		
			<div style="margin-top:10px; margin-left:10px; text-align:left;">
				<div style="color:red;"><b>Current stream: </b></div>
				<div style="padding-top:10px; border-bottom:1px solid #E6E6E6;">
					<div class="streamItem">
						<div style="float:left; border:2px solid #eeeeee;"><img src="images/f3.jpg"></div>
						
						<div style="float:left; padding-left:10px;">
							<img src="images/heart.gif" style="padding-top:2px;"/> 162
							<a href="" class="stream-link" >Football best goals </a> , Category: Sports (20 minutes, 45 viewers)
							
							<div  style="color:#555555; padding:5px; height:30px;">Short description of the video</div>
							<div style="padding-top:18px;"><a href="" class="comments-link">Join</a></div>
						</div>
						
					</div>
				</div>
				
				
				
				<div style="padding-top:10px;"><b>Coming streams: </b></div>
				<div style="padding-top:10px; border-bottom:1px solid #E6E6E6;">
				
					<div style="color:grey; text-align:cemter; padding-bottom:10px; width:500px;">No streams</div>
				
				</div>
				
				<div style="padding-top:10px;"><b>Past streams: </b></div>
				
				<% for(Stream stream: Helper.findStreamsByMaster(user)) { %>
					
						<div class="streamItem">
							<div style="float:left; border:2px solid #eeeeee;"><img src="images/f2.jpg"></div>
							<div style="float:left; padding-left:10px;">
								<img src="images/heart.gif" style="padding-top:2px;"/> 8
								<a href="" class="stream-link" ><%= stream.getName() %></a> , Category: <%= stream.getCategory().getName() %>
							
							<div  style="color:#555555; padding:5px; height:30px;">Short description of the video</div>
							<div style="padding-top:18px;"><a href="stream.jsp?streamId=<%= stream.getId()%>" class="comments-link">View comments</a></div>
						</div>
						
					</div>
				
				<% } %>
				
				
				</div>
			</div>
		</div>	
		
	<jsp:include page="footer.jsp" /> 	
		
	</center>

</body>
</html>